Crate md5

source ·
Expand description

The MD5 hash function.

Example

let digest = md5::compute(b"abcdefghijklmnopqrstuvwxyz");
assert_eq!(format!("{:x}", digest), "c3fcd3d76192e4007dfb496cca67e13b");

Security Warning

The package is provided for the purposes of interoperability with protocols and systems that mandate the use of MD5. However, MD5 should be considered cryptographically broken and unsuitable for further use. Collision attacks against MD5 are both practical and trivial, and theoretical attacks against MD5 have been found.

RFC6151 advises no new protocols to be designed with any MD5-based constructions, including HMAC-MD5.

Structs

A context.
A digest.

Functions

Compute the digest of data.